<template>
  <div class="my_input">
     <input type="text" placeholder="请输入搜索内容" :value="modelValue" @input="$emit('update:modelValue',$event.target.value)" @keydown.enter="$emit('submit')">
     <button @click="$emit('submit')">提交</button>
  </div>
</template>

<script>
import { ref, reactive, toRefs } from "vue";
export default {
  props:{
    modelValue: String
  },
  setup() {},
};
</script>
<style lang="scss" scoped>
.my_input{
  background: #fff;
  padding: 10px 15px;
  box-sizing: border-box;
  margin-top: 10px;
  input{
    display: block;
    width: 100%;
    height: 35px;
    border: 1px solid #e9e9e9;
    border-radius: 5px;
    padding: 0 10px;
    box-sizing: border-box;
    font-size: 14px;
  }
  button{
    width: 100%;
    border:none;
    background: #6a99dd;
    color: #fff;
    margin-top: 10px;
    padding: 8px 0;
    border-radius: 5px;
  }
}
</style>